# 我有两个杯子
# bottle_in_orange = "橙汁"  # 橙色的杯子装的是橙汁
# bottle_in_transparent = "水"  # 透明杯子装的是水

# 如何将橙汁放进透明的杯子，同时将水放进橙色的杯子，然后打印出结果

# 方法1 引入第三变量，进行调换
bottle_in_orange = "橙汁"  # 橙色的杯子装的是橙汁
bottle_in_transparent = "水"  # 透明杯子装的是水
bottle_in_blue = bottle_in_orange
bottle_in_orange = bottle_in_transparent
bottle_in_transparent = bottle_in_blue
print("橙色的杯子装的是"+bottle_in_orange, "透明杯子装的是"+bottle_in_transparent)

# 方法2 Python独有的便捷之法-序列解包赋值(这个方法最开始是AI自动生成的，我查了一下Python竟然有这个特性，真不错！)
# bottle_in_orange = "橙汁"  # 橙色的杯子装的是橙汁
# bottle_in_transparent = "水"  # 透明杯子装的是水
# bottle_in_orange, bottle_in_transparent = bottle_in_transparent, bottle_in_orange
# print("橙色的杯子装的是"+bottle_in_orange, "透明杯子装的是"+bottle_in_transparent)

# 链式赋值
name ,sex, age, mdn = "张三", "男", 18, "123456789"
print(name, sex, age, mdn)


